home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor2 / hsto.doc < prev    next >
Internet Message Format  |  1995-03-31  |  4KB

  1. From: cloos@acsu.buffalo.edu (James H. Cloos) 
  2. Newsgroups: comp.sys.hp48 
  3. Subject: Re: Shorter hidden-dir routines 
  4. Date: 7 Aug 91 21:05:05 GMT 
  5. Organization: State University of New York @ Buffalo 
  6.  
  7. [Note: *NOT* the same as HIDE and HIDER on previous Goodies Disks. 
  8.  For differences, see note at end.  -jkh-] 
  9.  
  10. úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ 
  11. 3 Mini-instructions: Syntax is just like STO, RCL, PURGE & VARS. -jkh- 3 
  12. àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù 
  13.  
  14. Given that there are reserved RPL words to store, recall, and purge 
  15. variables from the hidden directory, and that programs were earlier posted 
  16. to accomplish this from the user level, I thought I'd post these three 
  17. short routines.  I call them HSTO, HRCL, and HPURGE.  There's also a 
  18. fourth routine that gives you the list of all hidden vars, HVARS. 
  19.  
  20. Here are docs for them: 
  21.  
  22. HSTO    ( ob id -->  ) 
  23.     Stores ob in id in hidden dir 
  24.  
  25. HRCL    ( id --> ob) 
  26.     Recalls ob from id in hidden dir, Undef Name error if no such id. 
  27.  
  28. HPURGE    ( id -->  ) 
  29.     Purges id from hidden dir.  Note that lists are not an acceptable 
  30.     arg.    *PLEASE* only hpurge what you hsto.  I'm not responsible 
  31.     for any lost data caused by misuse of this routine. 
  32.  
  33. HVARS    (  --> list ) 
  34.     Pushes list of variables in hidden dir onto stack. 
  35.  
  36. I recomend highly that you DO NOT HPURGE 'Alarms', 'UserKeys', or 
  37. 'UserKeys.CRC'.  I did not, however, include code to check for these and 
  38. cause an error.  Just be smart. ;) 
  39.  
  40. Here are the routines in System RPL: 
  41.  
  42. HSTO 
  43.     :: CK2NOLASTWD 
  44.        :: CK&DISPATCH1 
  45.         idnt StoHiddenVar 
  46.        ; 
  47.     ; 
  48.  
  49. HRCL 
  50.     :: CK1NOLASTWD 
  51.        :: CK&DISPATCH1 
  52.         idnt :: RclHiddenVar ?SEMI # 204h DO#EXIT ; 
  53.        ; 
  54.     ; 
  55.  
  56. HPURGE 
  57.     :: CK1NOLASTWD 
  58.        :: CK&DISPATCH1 
  59.         idnt PuHiddenVar 
  60.        ; 
  61.     ; 
  62.  
  63. HVARS 
  64.     :: CK0NOLASTWD PATHDIR HOMEDIR ID "" DOVARS SWAP COMPEVAL 
  65.     ; 
  66.  
  67.  
  68. As you can see, they are quite small.  HRCL generates the same error if the 
  69. name is not in the hidden dir that RCL generates if it can't find a name. 
  70.  
  71. Happy developing! 
  72.  
  73. -JimC 
  74. -- 
  75. James H. Cloos, Jr.          "Entropy isn't what it used to be." 
  76. Cloos@CrnlThry.BITNET            --c/o Fortune  (PH: +1 716 866-5249) 
  77. Cloos@TCGould.TN.Cornell.EDU           #include <std_disclaimers.h> 
  78. <world>!cornell!batcomputer!cloos      PersonalZipCode: 14226-1111 
  79.  
  80. ---------- 
  81.  
  82. Note from Joe Horn: 
  83.  
  84. If all you wish to do is hide things from the VAR menu, then these four 
  85. wonderfully fast and tiny routines fully obsolete and replace HIDE (on Goodies 
  86. Disk #1) and HIDER (on Goodies Disk #5).  Note, however, that those programs 
  87. worked completely differently than this one (HSTO), and may be preferred for 
  88. some applications.  Here's why. 
  89.  
  90. Although all three programs seem to make objects disappear, they do so in 
  91. radically different ways. 
  92.  
  93. HIDE and HIDER only work in subdirectories (not in HOME), because they "hide" 
  94. things while still keeping them inside the subdirectory.  They do this by 
  95. placing a special marker in the middle of the VARS list.  The HP 48 
  96. automatically "hides" all vars following that marker.  (The marker is in fact 
  97. the nullname (see NULLNAME.DOC on Goodies Disk #1), which already exists in 
  98. the HOME directory, where it MUST be the final var, which is why HIDE and 
  99. HIDER cannot work on the HOME directory). 
  100.  
  101. The upshot of all this is that things hidden with HIDE and HIDER are still 
  102. actually inside their respective subdirectories, and will be recalled, stored, 
  103. purged, uploaded, downloaded, etc. along with the rest of the subdirectory. 
  104. If this is what you want, then use HIDE and/or HIDER (or their techniques), 
  105. not HSTO. 
  106.  
  107. HSTO, on the other hand, uses the system's hidden directory (the nullnamed 
  108. directory at the end of the HOME directory) to hide things.  Something HSTO'd 
  109. is NOT still in its original directory at all; it's not only hidden, it's 
  110. BURIED!  The upshot of *this* is that HSTO'd objects will NOT be recalled, 
  111. stored, purged, uploaded, downloaded, etc. along with the rest of the original 
  112. subdirectory, because they're not there!  If this is what you want, use HSTO. 
  113.  
  114. -jkh- 
  115.